package com.wicket.okrpbff.biz.service.impl;

import cn.hutool.core.bean.BeanUtil;
import com.wicket.okrapp.integration.FwAppOffStateClient;
import com.wicket.okrapp.integration.dto.QueryCheckItemListReqDto;
import com.wicket.okrapp.integration.dto.QueryCheckItemListRespDto;
import com.wicket.okrframework.integration.FwBaseBaseClient;
import com.wicket.okrframework.integration.FwBaseCommonClient;
import com.wicket.okrframework.integration.FwBaseInductionRecordClient;
import com.wicket.okrframework.integration.dto.*;
import com.wicket.okrpbff.biz.service.BaseService;
import com.wicket.okrpbff.biz.service.dto.common.BffFrameworkSpaceDto;
import com.wicket.okrpbff.biz.service.dto.common.BffSenceDto;
import com.wicket.okrpbff.biz.service.dto.common.BffUnionAppDto;
import com.wicket.okrpbff.biz.service.dto.req.*;
import com.wicket.okrpbff.biz.service.dto.res.*;
import com.wicket.okrpbff.common.exception.BizException;
import com.wicket.okrpbff.common.util.CommonFunctionHelper;
import com.wicket.okrpbff.common.util.RedisUtil;
import org.apache.skywalking.apm.toolkit.trace.Tag;
import org.apache.skywalking.apm.toolkit.trace.Tags;
import org.apache.skywalking.apm.toolkit.trace.Trace;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.stream.Collectors;
import com.wicket.okrpbff.common.exception.Assert;
import cn.hutool.core.collection.CollectionUtil;
import java.util.ArrayList;
import java.util.List;
import com.wicket.okrpbff.biz.service.dto.common.BffScreenSpaceDto;
import com.wicket.okrapp.integration.dto.TransitionCheckItemComRespDto;
import com.wicket.okrapp.integration.dto.TransitionCheckItemComReqDto;
import com.wicket.okrcomponent.integration.FwCompMessageClient;
import com.wicket.okrcomponent.integration.dto.ImplementIniOrgWorkTaskMsgLocationByLoginComRespDto;
import com.wicket.okrcomponent.integration.dto.ImplementIniOrgWorkTaskMsgLocationByLoginComReqDto;

/**
 * @author ：
 * @date ：
 *
 *
 * @version 1.0
 */
@Service
public class BaseServiceImpl implements BaseService {

    @Resource
    FwBaseBaseClient fwBaseBaseClient;
    @Resource
    FwBaseInductionRecordClient fwBaseInductionRecordClient;
    @Resource
    FwBaseCommonClient fwBaseCommonClient;
    @Resource
    FwAppOffStateClient fwAppOffStateClient;
    @Resource
    private RedisUtil redisUtil;
@Resource
  FwCompMessageClient fwCompMessageClient;

    /**
   * B1-2新增场景（平台）[298]
   * gen by moon at 8/10/2022, 3:39:24 AM
   */
    @Trace(operationName = "B1-2新增场景（平台）")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffAddSceneRespDto addScene(BffAddSceneReqDto reqDto){
      
       
       AddSceneRespDto addSceneRespDto_1 = null;
//步骤0: D1-2-07新增场景 - addScene
     AddSceneRespDto addSceneRespDto = null;
    AddSceneReqDto addSceneReqDto=new AddSceneReqDto();
  if(reqDto!=null){
      addSceneReqDto.setSenceCode(reqDto.getSenceCode());//sourceId:15016_1
addSceneReqDto.setSceneName(reqDto.getSceneName());//sourceId:15017_1
addSceneReqDto.setSceneRemark(reqDto.getSceneRemark());//sourceId:15018_1
addSceneReqDto.setSceneLogo(reqDto.getSceneLogo());//sourceId:15019_1
addSceneReqDto.setPlatformType(reqDto.getPlatformType());//sourceId:15021_1
addSceneReqDto.setAscriptionAppId(reqDto.getAscriptionAppId());//sourceId:33557_1
addSceneReqDto.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//sourceId:33558_1
    }
  
    /*D1-2-07新增场景[297]   */
    Assert.isNull(addSceneReqDto.getSenceCode(),"B1-2新增场景（平台）-D1-2-07新增场景-场景编码不能为空",false);
Assert.isNull(addSceneReqDto.getSceneName(),"B1-2新增场景（平台）-D1-2-07新增场景-场景中文名称不能为空",false);
Assert.isNull(addSceneReqDto.getPlatformType(),"B1-2新增场景（平台）-D1-2-07新增场景-是否是平台不能为空",false);
Assert.isNull(addSceneReqDto.getAscriptionAppId(),"B1-2新增场景（平台）-D1-2-07新增场景-隶属联盟应用ID不能为空",false);
Assert.isNull(addSceneReqDto.getSubjectLifeCycle(),"B1-2新增场景（平台）-D1-2-07新增场景-主体生命周期不能为空",false);
      addSceneRespDto = fwBaseBaseClient.addScene(addSceneReqDto).getData();
      
      addSceneRespDto_1 = addSceneRespDto;
    
BffAddSceneRespDto retData = new BffAddSceneRespDto();
  if(addSceneRespDto_1!=null){
      retData.setSceneId(addSceneRespDto_1.getSceneId());//sourceId:28422_1
    }
  

  
  
return retData;
  }

    /**
   * B1-2查询空间列表（平台）[433]
   * gen by moon at 8/10/2022, 3:39:52 AM
   */
    @Trace(operationName = "B1-2查询空间列表（平台）")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffQuerySpaceListRespDto querySpaceList(BffQuerySpaceListReqDto reqDto){
      
       
       QuerySpaceListRespDto querySpaceListRespDto_1 = null;
BatchQueryInductionRecordListComRespDto batchQueryInductionRecordListComRespDto_1 = null;
//步骤0: D1-2查询空间列表 - querySpaceList
     QuerySpaceListRespDto querySpaceListRespDto = null;
    QuerySpaceListReqDto querySpaceListReqDto=new QuerySpaceListReqDto();
  
  
    /*D1-2查询空间列表[434]   */
    
      querySpaceListRespDto = fwBaseBaseClient.querySpaceList(querySpaceListReqDto).getData();
      
      querySpaceListRespDto_1 = querySpaceListRespDto;
    
//步骤1: D1-3批量查询就职记录列表（公共） - batchQueryInductionRecordListCom
     BatchQueryInductionRecordListComRespDto batchQueryInductionRecordListComRespDto = null;
    if(querySpaceListRespDto !=null){
          BatchQueryInductionRecordListComReqDto batchQueryInductionRecordListComReqDto=new BatchQueryInductionRecordListComReqDto();
  if(querySpaceListRespDto!=null){
      batchQueryInductionRecordListComReqDto.setPerOrgInductionRecordList(querySpaceListRespDto.getSpaceList().stream().map(item->item.getCreateInductionId())
        .collect(Collectors.toList()));//sourceId:32491_1
    }
  
    /*D1-3批量查询就职记录列表（公共）[602]   */
    
      batchQueryInductionRecordListComRespDto = fwBaseInductionRecordClient.batchQueryInductionRecordListCom(batchQueryInductionRecordListComReqDto).getData();
      
      batchQueryInductionRecordListComRespDto_1 = batchQueryInductionRecordListComRespDto;
           }
    
BffQuerySpaceListRespDto retData = new BffQuerySpaceListRespDto();
  //数据集融合
        if(querySpaceListRespDto_1!= null && !CollectionUtil.isEmpty(querySpaceListRespDto_1.getSpaceList())){
          for (FrameworkSpaceDto frameworkSpaceDto : querySpaceListRespDto_1.getSpaceList()) {
              BffFrameworkSpaceDto retElm = new BffFrameworkSpaceDto();
             if(querySpaceListRespDto_1!=null){
      retElm.setSpaceId(frameworkSpaceDto.getSpaceId());//sourceId:14526_2
retElm.setSpaceName(frameworkSpaceDto.getSpaceName());//sourceId:14527_2
retElm.setSpaceLogo(frameworkSpaceDto.getSpaceLogo());//sourceId:62115_2
retElm.setOrganizationNumber(frameworkSpaceDto.getOrganizationNumber());//sourceId:14529_2
retElm.setPlatformType(frameworkSpaceDto.getPlatformType());//sourceId:14530_2
retElm.setIsInvalid(frameworkSpaceDto.getIsInvalid());//sourceId:14531_2
retElm.setCreateInductionId(frameworkSpaceDto.getCreateInductionId());//sourceId:14532_2
retElm.setCreateTime(frameworkSpaceDto.getCreateTime());//sourceId:14533_2
    }
              retData.getSpaceList().add(retElm);
               if(batchQueryInductionRecordListComRespDto_1!= null){
          for (PerOrgInductionRecordDto perOrgInductionRecordDto : batchQueryInductionRecordListComRespDto_1.getPerOrgInductionRecordList()) {
                if (perOrgInductionRecordDto.getInductionRecordId().equals(frameworkSpaceDto.getCreateInductionId())) {
                 if(batchQueryInductionRecordListComRespDto_1!=null){
      retElm.setUserId(perOrgInductionRecordDto.getUserId());//sourceId:38697_2
retElm.setIdCardName(perOrgInductionRecordDto.getIdCardName());//sourceId:38698_2
retElm.setNickName(perOrgInductionRecordDto.getNickName());//sourceId:38699_2
    }
                }
            }
          }
        
          }
        }//sourceId:32490_1
  

  retData.setPageNum(querySpaceListRespDto.getPageNum());
        retData.setPageSize(querySpaceListRespDto.getPageSize());
        retData.setTotal(querySpaceListRespDto.getTotalNum());
        retData.setIsLastPage((Math.ceil(Double.valueOf(querySpaceListRespDto.getTotalNum()) / Double.valueOf(querySpaceListRespDto.getPageSize()))) <= retData.getPageNum());
        
  
return retData;
  }

    /**
   * B1-2存档联盟应用(平台）[1719]
   * gen by moon at 8/10/2022, 3:43:44 AM
   */
    @Trace(operationName = "B1-2存档联盟应用(平台）")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffArchiveAppRespDto archiveApp(BffArchiveAppReqDto reqDto){
      
       
       //步骤0: D1-2修改联盟应用 - updateApp
     UpdateAppRespDto updateAppRespDto = null;
    UpdateAppReqDto updateAppReqDto=new UpdateAppReqDto();
  updateAppReqDto.setIsArchive("TRUE");//sourceId:51810_1
updateAppReqDto.setSubjectLifeCycle("ARCHIVING");//sourceId:51807_1
if(reqDto!=null){
      updateAppReqDto.setAppId(reqDto.getAppId());//sourceId:51793_1
    }
  
    /*D1-2修改联盟应用[568]   */
    Assert.isNull(updateAppReqDto.getAppId(),"B1-2存档联盟应用(平台）-D1-2修改联盟应用-应用ID不能为空",false);
Assert.isNull(updateAppReqDto.getIsArchive(),"B1-2存档联盟应用(平台）-D1-2修改联盟应用-是否存档不能为空",false);
Assert.isNull(updateAppReqDto.getSubjectLifeCycle(),"B1-2存档联盟应用(平台）-D1-2修改联盟应用-主体生命周期不能为空",false);
      updateAppRespDto = fwBaseBaseClient.updateApp(updateAppReqDto).getData();
      
      
    
BffArchiveAppRespDto retData = new BffArchiveAppRespDto();
  
  

  
  
return retData;
  }

    /**
   * B1-2存档场景（平台）[1718]
   * gen by moon at 8/10/2022, 3:43:42 AM
   */
    @Trace(operationName = "B1-2存档场景（平台）")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffArchiveSceneRespDto archiveScene(BffArchiveSceneReqDto reqDto){
      
       
       //步骤0: D1-2-07修改场景 - updateScene
     UpdateSceneRespDto updateSceneRespDto = null;
    UpdateSceneReqDto updateSceneReqDto=new UpdateSceneReqDto();
  updateSceneReqDto.setIsArchive("TRUE");//sourceId:51789_1
updateSceneReqDto.setSubjectLifeCycle("ARCHIVING");//sourceId:51786_1
if(updateSceneReqDto!=null && updateSceneReqDto.getSubjectLifeCycle()!=null && updateSceneReqDto.getSubjectLifeCycle().equals("ARCHIVING")) {
              updateSceneReqDto.setArchiveInductionId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecInductionRecordId());//ARCHIVE_CURRENT_INDUCTIONID
          }//sourceId:51790_1
if(updateSceneReqDto!=null && updateSceneReqDto.getSubjectLifeCycle()!=null && updateSceneReqDto.getSubjectLifeCycle().equals("ARCHIVING")) {
              updateSceneReqDto.setArchiveTime(CommonFunctionHelper.getCurrentTime());//HISTORICAL_ARCHIVING
          }//sourceId:51791_1
if(reqDto!=null){
      updateSceneReqDto.setSceneId(reqDto.getSceneId());//sourceId:51781_1
    }
  
    /*D1-2-07修改场景[301]   */
    Assert.isNull(updateSceneReqDto.getSceneId(),"B1-2存档场景（平台）-D1-2-07修改场景-场景ID不能为空",false);
Assert.isNull(updateSceneReqDto.getIsArchive(),"B1-2存档场景（平台）-D1-2-07修改场景-是否存档不能为空",false);
Assert.isNull(updateSceneReqDto.getSubjectLifeCycle(),"B1-2存档场景（平台）-D1-2-07修改场景-主体生命周期不能为空",false);
Assert.isNull(updateSceneReqDto.getArchiveInductionId(),"B1-2存档场景（平台）-D1-2-07修改场景-存档人就职记录ID不能为空",false);
Assert.isNull(updateSceneReqDto.getArchiveTime(),"B1-2存档场景（平台）-D1-2-07修改场景-存档时间不能为空",false);
      updateSceneRespDto = fwBaseBaseClient.updateScene(updateSceneReqDto).getData();
      
      
    
BffArchiveSceneRespDto retData = new BffArchiveSceneRespDto();
  
  

  
  
return retData;
  }

    /**
     * 11111B1-2查应用短信配置详情[1433]
     */
    @Trace(operationName = "11111B1-2查应用短信配置详情")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryAppMessageSetDetailRespDto queryAppMessageSetDetail(BffQueryAppMessageSetDetailReqDto reqDto) {


        BffQueryAppMessageSetDetailRespDto retData = new BffQueryAppMessageSetDetailRespDto();


        return retData;
    }

    /**
     * 111111B1-2修改应用短信配置[1430]
     */
    @Trace(operationName = "111111B1-2修改应用短信配置")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffUpdateAppMessageSetRespDto updateAppMessageSet(BffUpdateAppMessageSetReqDto reqDto) {


        BffUpdateAppMessageSetRespDto retData = new BffUpdateAppMessageSetRespDto();


        return retData;
    }

    /**
   * B1-2新增平台应用（平台）[1422]
   * gen by moon at 12/2/2022, 5:09:39 PM
   */
    @Trace(operationName = "B1-2新增平台应用（平台）")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffAddPlatformAppRespDto addPlatformApp(BffAddPlatformAppReqDto reqDto){
      
       
       AddAppRespDto addAppRespDto_1 =null;
//步骤0: D1-2新增联盟应用 - addApp
     AddAppRespDto addAppRespDto = null;
    AddAppReqDto addAppReqDto=new AddAppReqDto();
  addAppReqDto.setPlatformType("TRUE");//sourceId:33377_1
if(reqDto!=null){
      addAppReqDto.setAppName(reqDto.getAppName());//SimpleFieldAssign//sourceId:33365_1
addAppReqDto.setAppIntroduce(reqDto.getAppIntroduce());//SimpleFieldAssign//sourceId:33366_1
addAppReqDto.setAppUpdateIntroduct(reqDto.getAppUpdateIntroduct());//SimpleFieldAssign//sourceId:33367_1
addAppReqDto.setWebsite(reqDto.getWebsite());//SimpleFieldAssign//sourceId:33368_1
addAppReqDto.setAppLogo(reqDto.getAppLogo());//SimpleFieldAssign//sourceId:33369_1
addAppReqDto.setAboutLogo(reqDto.getAboutLogo());//SimpleFieldAssign//sourceId:33370_1
addAppReqDto.setAppBanner(reqDto.getAppBanner());//SimpleFieldAssign//sourceId:33371_1
addAppReqDto.setAppBigBanner(reqDto.getAppBigBanner());//SimpleFieldAssign//sourceId:62299_1
addAppReqDto.setServicePhone(reqDto.getServicePhone());//SimpleFieldAssign//sourceId:33372_1
addAppReqDto.setServiceTime(reqDto.getServiceTime());//SimpleFieldAssign//sourceId:33373_1
addAppReqDto.setCopyright(reqDto.getCopyright());//SimpleFieldAssign//sourceId:33374_1
addAppReqDto.setAppVersion(reqDto.getAppVersion());//SimpleFieldAssign//sourceId:33375_1
addAppReqDto.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:33378_1
    }
  
    /*D1-2新增联盟应用[557]   */
    Assert.isNull(addAppReqDto.getAppName(),"B1-2新增平台应用（平台）-D1-2新增联盟应用-应用名称不能为空",false);
Assert.isNull(addAppReqDto.getAppLogo(),"B1-2新增平台应用（平台）-D1-2新增联盟应用-应用框架logo图片不能为空",false);
Assert.isNull(addAppReqDto.getAboutLogo(),"B1-2新增平台应用（平台）-D1-2新增联盟应用-关于我们logo图片不能为空",false);
Assert.isNull(addAppReqDto.getAppBanner(),"B1-2新增平台应用（平台）-D1-2新增联盟应用-应用登录banner不能为空",false);
Assert.isNull(addAppReqDto.getCopyright(),"B1-2新增平台应用（平台）-D1-2新增联盟应用-版权信息不能为空",false);
Assert.isNull(addAppReqDto.getAppVersion(),"B1-2新增平台应用（平台）-D1-2新增联盟应用-应用版本信息不能为空",false);
Assert.isNull(addAppReqDto.getSubjectLifeCycle(),"B1-2新增平台应用（平台）-D1-2新增联盟应用-主体生命周期不能为空",false);
Assert.isNull(addAppReqDto.getPlatformType(),"B1-2新增平台应用（平台）-D1-2新增联盟应用-是否平台应用不能为空",false);
      addAppRespDto = fwBaseBaseClient.addApp(addAppReqDto).getData();
      
      
      addAppRespDto_1 = addAppRespDto;
    
BffAddPlatformAppRespDto retData = new BffAddPlatformAppRespDto();
  if(addAppRespDto_1!=null){
      retData.setAppId(addAppRespDto_1.getAppId());//SimpleFieldAssign//sourceId:33405_1
    }
  

  
  
return retData;
  }

    /**
   * B1-1完善平台应用（平台）[1420]
   * gen by moon at 8/10/2022, 3:43:31 AM
   */
    @Trace(operationName = "B1-1完善平台应用（平台）")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffPerfectPlatformAppRespDto perfectPlatformApp(BffPerfectPlatformAppReqDto reqDto){
      
       
       //步骤0: D1-2修改联盟应用 - updateApp
     UpdateAppRespDto updateAppRespDto = null;
    UpdateAppReqDto updateAppReqDto=new UpdateAppReqDto();
  if(reqDto!=null){
      updateAppReqDto.setAppId(reqDto.getAppId());//sourceId:33337_1
updateAppReqDto.setUniqueSpaceId(reqDto.getUniqueSpaceId());//sourceId:33338_1
updateAppReqDto.setSceneId(reqDto.getSceneId());//sourceId:33339_1
    }
  
    /*D1-2修改联盟应用[568]   */
    Assert.isNull(updateAppReqDto.getAppId(),"B1-1完善平台应用（平台）-D1-2修改联盟应用-应用ID不能为空",false);
Assert.isNull(updateAppReqDto.getUniqueSpaceId(),"B1-1完善平台应用（平台）-D1-2修改联盟应用-管理的空间ID不能为空",false);
Assert.isNull(updateAppReqDto.getSceneId(),"B1-1完善平台应用（平台）-D1-2修改联盟应用-空间的场景ID不能为空",false);
      updateAppRespDto = fwBaseBaseClient.updateApp(updateAppReqDto).getData();
      
      
    
BffPerfectPlatformAppRespDto retData = new BffPerfectPlatformAppRespDto();
  
  

  
  
return retData;
  }

    /**
   * B1-2取消设无效空间（平台）[1415]
   * gen by moon at 8/10/2022, 3:43:29 AM
   */
    @Trace(operationName = "B1-2取消设无效空间（平台）")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffCancelIsinvalidSetSpaceIdRespDto cancelIsinvalidSetSpaceId(BffCancelIsinvalidSetSpaceIdReqDto reqDto){
      
       
       //步骤0: D1-2修改空间 - updateSpace
     UpdateSpaceRespDto updateSpaceRespDto = null;
    UpdateSpaceReqDto updateSpaceReqDto=new UpdateSpaceReqDto();
  updateSpaceReqDto.setIsInvalid("FALSE");//sourceId:33141_1
if(updateSpaceReqDto!=null && updateSpaceReqDto.getIsInvalid() !=null &&updateSpaceReqDto.getIsInvalid().equals("FALSE")){
              updateSpaceReqDto.setIsInvalidReason(null);
          }//sourceId:33142_1
if(updateSpaceReqDto!=null && updateSpaceReqDto.getIsInvalid() !=null &&updateSpaceReqDto.getIsInvalid().equals("FALSE")){
              updateSpaceReqDto.setIsInvalidTime(null);
          }//sourceId:33143_1
if(reqDto!=null){
      updateSpaceReqDto.setSpaceId(reqDto.getSpaceId());//sourceId:33135_1
    }
  
    /*D1-2修改空间[439]   */
    Assert.isNull(updateSpaceReqDto.getSpaceId(),"B1-2取消设无效空间（平台）-D1-2修改空间-空间ID不能为空",false);
//Assert.isNull(updateSpaceReqDto.getIsInvalid(),"B1-2取消设无效空间（平台）-D1-2修改空间-是否失效不能为空",false);
//Assert.isNull(updateSpaceReqDto.getIsInvalidReason(),"B1-2取消设无效空间（平台）-D1-2修改空间-失效原因不能为空",false);
      updateSpaceRespDto = fwBaseBaseClient.updateSpace(updateSpaceReqDto).getData();
      
      
    
BffCancelIsinvalidSetSpaceIdRespDto retData = new BffCancelIsinvalidSetSpaceIdRespDto();
  
  

  
  
return retData;
  }

    /**
   * B1-2查场景列表（公共）[1312]
   * gen by moon at 8/10/2022, 3:43:12 AM
   */
    @Trace(operationName = "B1-2查场景列表（公共）")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffQuerySceneListComRespDto querySceneListCom(BffQuerySceneListComReqDto reqDto){
      
       
       QuerySceneListBorderRespDto querySceneListBorderRespDto_1 = null;
//步骤0: D1-2查场景列表(边界) - querySceneListBorder
     QuerySceneListBorderRespDto querySceneListBorderRespDto = null;
    QuerySceneListBorderReqDto querySceneListBorderReqDto=new QuerySceneListBorderReqDto();
  querySceneListBorderReqDto.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:33616_1
if(reqDto!=null){
      querySceneListBorderReqDto.setAscriptionAppId(reqDto.getAscriptionAppId());//sourceId:120943_1
    }
  
    /*D1-2查场景列表(边界)[1313]   */
    Assert.isNull(querySceneListBorderReqDto.getSubjectLifeCycle(),"B1-2查场景列表（公共）-D1-2查场景列表(边界)-主体生命周期不能为空",false);
      querySceneListBorderRespDto = fwBaseBaseClient.querySceneListBorder(querySceneListBorderReqDto).getData();
      
      querySceneListBorderRespDto_1 = querySceneListBorderRespDto;
    
BffQuerySceneListComRespDto retData = new BffQuerySceneListComRespDto();
  if(querySceneListBorderRespDto_1!=null){
      retData.setSenceList(querySceneListBorderRespDto_1.getSenceList().stream().map(item -> BeanUtil.toBean(item, BffSenceDto.class)).collect(Collectors.toList()));//sourceId:30660_1
    }
  

  
  
return retData;
  }

    /**
   * B1-2查联盟应用列表（边界）[1310]
   * gen by moon at 8/10/2022, 3:43:08 AM
   */
    @Trace(operationName = "B1-2查联盟应用列表（边界）")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffQueryAppListBorderRespDto queryAppListBorder(BffQueryAppListBorderReqDto reqDto){
      
       
       QueryAppListBorderRespDto queryAppListBorderRespDto_1 = null;
//步骤0: D1-2查联盟应用列表(边界) - queryAppListBorder
     QueryAppListBorderRespDto queryAppListBorderRespDto = null;
    QueryAppListBorderReqDto queryAppListBorderReqDto=new QueryAppListBorderReqDto();
  
  
    /*D1-2查联盟应用列表(边界)[1308]   */
    
      queryAppListBorderRespDto = fwBaseBaseClient.queryAppListBorder(queryAppListBorderReqDto).getData();
      
      queryAppListBorderRespDto_1 = queryAppListBorderRespDto;
    
BffQueryAppListBorderRespDto retData = new BffQueryAppListBorderRespDto();
  if(queryAppListBorderRespDto_1!=null){
      retData.setUnionAppList(queryAppListBorderRespDto_1.getUnionAppList().stream().map(item -> BeanUtil.toBean(item, BffUnionAppDto.class)).collect(Collectors.toList()));//sourceId:30646_1
    }
  

  
  
return retData;
  }

    /**
   * B1-2设为是否无效空间（平台）[740]
   * gen by moon at 8/10/2022, 3:41:08 AM
   */
    @Trace(operationName = "B1-2设为是否无效空间（平台）")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffUpdateIsinvalidSetSpaceIdRespDto updateIsinvalidSetSpaceId(BffUpdateIsinvalidSetSpaceIdReqDto reqDto){
      
       
       //步骤0: D1-2修改空间 - updateSpace
     UpdateSpaceRespDto updateSpaceRespDto = null;
    UpdateSpaceReqDto updateSpaceReqDto=new UpdateSpaceReqDto();
  updateSpaceReqDto.setIsInvalid("TRUE");//sourceId:16107_1
updateSpaceReqDto.setIsInvalidTime(CommonFunctionHelper.getCurrentTime());//SYSTEM_CURRENT_TIME//sourceId:16109_1
if(reqDto!=null){
      updateSpaceReqDto.setSpaceId(reqDto.getSpaceId());//sourceId:16100_1
updateSpaceReqDto.setInvalidType(reqDto.getInvalidType());//sourceId:16110_1
updateSpaceReqDto.setIsInvalidReason(reqDto.getIsInvalidReason());//sourceId:16108_1
    }
  
    /*D1-2修改空间[439]   */
    Assert.isNull(updateSpaceReqDto.getSpaceId(),"B1-2设为是否无效空间（平台）-D1-2修改空间-空间ID不能为空",false);
Assert.isNull(updateSpaceReqDto.getIsInvalid(),"B1-2设为是否无效空间（平台）-D1-2修改空间-是否失效不能为空",false);
Assert.isNull(updateSpaceReqDto.getInvalidType(),"B1-2设为是否无效空间（平台）-D1-2修改空间-失效类型不能为空",false);
Assert.isNull(updateSpaceReqDto.getIsInvalidTime(),"B1-2设为是否无效空间（平台）-D1-2修改空间-失效时间不能为空",false);
      updateSpaceRespDto = fwBaseBaseClient.updateSpace(updateSpaceReqDto).getData();
      
      
    
BffUpdateIsinvalidSetSpaceIdRespDto retData = new BffUpdateIsinvalidSetSpaceIdRespDto();
  
  

  
  
return retData;
  }

    /**
   * B1-2查询场景列表（平台）[678]
   * gen by moon at 8/10/2022, 3:41:06 AM
   */
    @Trace(operationName = "B1-2查询场景列表（平台）")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffQuerySceneListRespDto querySceneList(BffQuerySceneListReqDto reqDto){
      
       
       QuerySceneListRespDto querySceneListRespDto_1 = null;
BatchQueryInductionRecordListComRespDto batchQueryInductionRecordListComRespDto_1 = null;
//步骤0: D1-2查询场景列表 - querySceneList
     QuerySceneListRespDto querySceneListRespDto = null;
    QuerySceneListReqDto querySceneListReqDto=new QuerySceneListReqDto();
  if(reqDto!=null){
      querySceneListReqDto.setIsArchive(reqDto.getIsArchive());//sourceId:15169_1
querySceneListReqDto.setPlatformType(reqDto.getPlatformType());//sourceId:13541_1
    }
  
    /*D1-2查询场景列表[299]   */
    Assert.isNull(querySceneListReqDto.getIsArchive(),"B1-2查询场景列表（平台）-D1-2查询场景列表-是否存档不能为空",false);
      querySceneListRespDto = fwBaseBaseClient.querySceneList(querySceneListReqDto).getData();
      
      querySceneListRespDto_1 = querySceneListRespDto;
    
//步骤1: D1-3批量查询就职记录列表（公共） - batchQueryInductionRecordListCom
     BatchQueryInductionRecordListComRespDto batchQueryInductionRecordListComRespDto = null;
    if(querySceneListRespDto !=null){
          BatchQueryInductionRecordListComReqDto batchQueryInductionRecordListComReqDto=new BatchQueryInductionRecordListComReqDto();
  if(querySceneListRespDto!=null){
      batchQueryInductionRecordListComReqDto.setPerOrgInductionRecordList(querySceneListRespDto.getSenceList().stream().map(item->item.getOperationInductionId())
        .collect(Collectors.toList()));//sourceId:15180_1
    }
  
    /*D1-3批量查询就职记录列表（公共）[602]   */
    
      batchQueryInductionRecordListComRespDto = fwBaseInductionRecordClient.batchQueryInductionRecordListCom(batchQueryInductionRecordListComReqDto).getData();
      
      batchQueryInductionRecordListComRespDto_1 = batchQueryInductionRecordListComRespDto;
           }
    
BffQuerySceneListRespDto retData = new BffQuerySceneListRespDto();
  //数据集融合
        if(querySceneListRespDto_1!= null && !CollectionUtil.isEmpty(querySceneListRespDto_1.getSenceList())){
          for (SenceDto senceDto : querySceneListRespDto_1.getSenceList()) {
              BffSenceDto retElm = new BffSenceDto();
             if(querySceneListRespDto_1!=null){
      retElm.setSceneId(senceDto.getSceneId());//sourceId:5114_2
retElm.setSenceCode(senceDto.getSenceCode());//sourceId:5115_2
retElm.setSceneName(senceDto.getSceneName());//sourceId:5116_2
retElm.setSceneRemark(senceDto.getSceneRemark());//sourceId:15005_2
retElm.setSceneLogo(senceDto.getSceneLogo());//sourceId:15006_2
retElm.setPlatformType(senceDto.getPlatformType());//sourceId:15007_2
retElm.setAscriptionAppId(senceDto.getAscriptionAppId());//sourceId:15008_2
retElm.setAppName(senceDto.getAppName());//sourceId:20903_2
retElm.setSubjectLifeCycle(senceDto.getSubjectLifeCycle());//sourceId:5117_2
retElm.setOperationInductionId(senceDto.getOperationInductionId());//sourceId:5118_2
retElm.setOperateTime(senceDto.getOperateTime());//sourceId:5119_2
    }
              retData.getSenceList().add(retElm);
               if(batchQueryInductionRecordListComRespDto_1!= null){
          for (PerOrgInductionRecordDto perOrgInductionRecordDto : batchQueryInductionRecordListComRespDto_1.getPerOrgInductionRecordList()) {
                if (perOrgInductionRecordDto.getInductionRecordId().equals(senceDto.getOperationInductionId())) {
                 if(batchQueryInductionRecordListComRespDto_1!=null){
      retElm.setUserId(perOrgInductionRecordDto.getUserId());//sourceId:38781_2
retElm.setUserFace(perOrgInductionRecordDto.getUserFace());//sourceId:38784_2
retElm.setIdCardName(perOrgInductionRecordDto.getIdCardName());//sourceId:38782_2
retElm.setNickName(perOrgInductionRecordDto.getNickName());//sourceId:38783_2
    }
                }
            }
          }
        
          }
        }//sourceId:13549_1
  

  retData.setPageNum(querySceneListRespDto.getPageNum());
        retData.setPageSize(querySceneListRespDto.getPageSize());
        retData.setTotal(querySceneListRespDto.getTotalNum());
        retData.setIsLastPage((Math.ceil(Double.valueOf(querySceneListRespDto.getTotalNum()) / Double.valueOf(querySceneListRespDto.getPageSize()))) <= retData.getPageNum());
        
  
return retData;
  }

    /**
   * B1-2查询空间应用详情（平台）[621]
   * gen by moon at 11/29/2022, 8:06:51 PM
   */
    @Trace(operationName = "B1-2查询空间应用详情（平台）")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffQuerySpaceAppDetailRespDto querySpaceAppDetail(BffQuerySpaceAppDetailReqDto reqDto){
      
       
       QueryAppDetailRespDto queryAppDetailRespDto_3 =null;
QueryInductionRecordInfoDetailComRespDto queryInductionRecordInfoDetailComRespDto_1 =null;
//步骤0: D1-2查询联盟应用详情 - queryAppDetail
     QueryAppDetailRespDto queryAppDetailRespDto = null;
    QueryAppDetailReqDto queryAppDetailReqDto=new QueryAppDetailReqDto();
  if(reqDto!=null){
      queryAppDetailReqDto.setUniqueSpaceId(reqDto.getUniqueSpaceId());//SimpleFieldAssign//sourceId:32851_1
    }
  
    /*D1-2查询联盟应用详情（唯一空间查联盟应用ID）[541]   */
    Assert.isNull(queryAppDetailReqDto.getUniqueSpaceId(),"B1-2查询空间应用详情（平台）-D1-2查询联盟应用详情（唯一空间查联盟应用ID）-管理的空间ID不能为空",false);
      queryAppDetailRespDto = fwBaseBaseClient.queryAppDetail(queryAppDetailReqDto).getData();
      
      
      
    
//步骤1: D1-2查询联盟应用详情 - queryAppDetail
     QueryAppDetailRespDto queryAppDetailRespDto_2 = null;
    if(queryAppDetailRespDto !=null&&queryAppDetailRespDto!= null&&  queryAppDetailRespDto.getAppId() !=null){
          QueryAppDetailReqDto queryAppDetailReqDto_1=new QueryAppDetailReqDto();
  if(queryAppDetailRespDto!=null){
      queryAppDetailReqDto_1.setAppId(queryAppDetailRespDto.getAppId());//SimpleFieldAssign//sourceId:32853_1
    }
  
    /*D1-2查询联盟应用详情[541]   */
    Assert.isNull(queryAppDetailReqDto_1.getAppId(),"B1-2查询空间应用详情（平台）-D1-2查询联盟应用详情-应用ID不能为空",false);
      queryAppDetailRespDto_2 = fwBaseBaseClient.queryAppDetail(queryAppDetailReqDto_1).getData();
      
      
      queryAppDetailRespDto_3 = queryAppDetailRespDto_2;
           }
    
//步骤2: D1-3查询个人就职记录信息详情（公共） - queryInductionRecordInfoDetailCom
     QueryInductionRecordInfoDetailComRespDto queryInductionRecordInfoDetailComRespDto = null;
    if(queryAppDetailRespDto_2 !=null){
          QueryInductionRecordInfoDetailComReqDto queryInductionRecordInfoDetailComReqDto=new QueryInductionRecordInfoDetailComReqDto();
  if(queryAppDetailRespDto_2!=null){
      queryInductionRecordInfoDetailComReqDto.setInductionRecordId(queryAppDetailRespDto_2.getOperationInductionId());//SimpleFieldAssign//sourceId:32875_1
    }
  
    /*D1-3查询个人就职记录信息详情（公共）[715]   */
    Assert.isNull(queryInductionRecordInfoDetailComReqDto.getInductionRecordId(),"B1-2查询空间应用详情（平台）-D1-3查询个人就职记录信息详情（公共）-就职记录ID不能为空",false);
      queryInductionRecordInfoDetailComRespDto = fwBaseInductionRecordClient.queryInductionRecordInfoDetailCom(queryInductionRecordInfoDetailComReqDto).getData();
      
      
      queryInductionRecordInfoDetailComRespDto_1 = queryInductionRecordInfoDetailComRespDto;
           }
    
BffQuerySpaceAppDetailRespDto retData = new BffQuerySpaceAppDetailRespDto();
  if(queryAppDetailRespDto_3!=null){
      retData.setAppId(queryAppDetailRespDto_3.getAppId());//SimpleFieldAssign//sourceId:32883_1
retData.setAppCode(queryAppDetailRespDto_3.getAppCode());//SimpleFieldAssign//sourceId:32884_1
retData.setAppName(queryAppDetailRespDto_3.getAppName());//SimpleFieldAssign//sourceId:32885_1
retData.setAppIntroduce(queryAppDetailRespDto_3.getAppIntroduce());//SimpleFieldAssign//sourceId:32886_1
retData.setAppUpdateIntroduct(queryAppDetailRespDto_3.getAppUpdateIntroduct());//SimpleFieldAssign//sourceId:32887_1
retData.setWebsite(queryAppDetailRespDto_3.getWebsite());//SimpleFieldAssign//sourceId:32888_1
retData.setAppLogo(queryAppDetailRespDto_3.getAppLogo());//SimpleFieldAssign//sourceId:32889_1
retData.setAboutLogo(queryAppDetailRespDto_3.getAboutLogo());//SimpleFieldAssign//sourceId:32890_1
retData.setAppBanner(queryAppDetailRespDto_3.getAppBanner());//SimpleFieldAssign//sourceId:32891_1
retData.setAppBigBanner(queryAppDetailRespDto_3.getAppBigBanner());//SimpleFieldAssign//sourceId:62261_1
retData.setServicePhone(queryAppDetailRespDto_3.getServicePhone());//SimpleFieldAssign//sourceId:32892_1
retData.setServiceTime(queryAppDetailRespDto_3.getServiceTime());//SimpleFieldAssign//sourceId:32893_1
retData.setCopyright(queryAppDetailRespDto_3.getCopyright());//SimpleFieldAssign//sourceId:32894_1
retData.setPlatformType(queryAppDetailRespDto_3.getPlatformType());//SimpleFieldAssign//sourceId:32895_1
retData.setAppVersion(queryAppDetailRespDto_3.getAppVersion());//SimpleFieldAssign//sourceId:32896_1
retData.setSubjectLifeCycle(queryAppDetailRespDto_3.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:32898_1
retData.setOperationInductionId(queryAppDetailRespDto_3.getOperationInductionId());//SimpleFieldAssign//sourceId:32899_1
retData.setOperateTime(queryAppDetailRespDto_3.getOperateTime());//SimpleFieldAssign//sourceId:32900_1
    }
if(queryInductionRecordInfoDetailComRespDto_1!=null){
      retData.setUserId(queryInductionRecordInfoDetailComRespDto_1.getUserId());//SimpleFieldAssign//sourceId:32901_1
retData.setUserFace(queryInductionRecordInfoDetailComRespDto_1.getUserFace());//SimpleFieldAssign//sourceId:32904_1
retData.setIdCardName(queryInductionRecordInfoDetailComRespDto_1.getIdCardName());//SimpleFieldAssign//sourceId:32902_1
retData.setNickName(queryInductionRecordInfoDetailComRespDto_1.getNickName());//SimpleFieldAssign//sourceId:32903_1
    }
  

  
  
return retData;
  }

    /**
   * B1-2修改联盟应用（平台）[567]
   * gen by moon at 8/10/2022, 3:40:34 AM
   */
    @Trace(operationName = "B1-2修改联盟应用（平台）")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffUpdateAppRespDto updateApp(BffUpdateAppReqDto reqDto){
      
       
       //步骤0: D1-2修改联盟应用 - updateApp
     UpdateAppRespDto updateAppRespDto = null;
    UpdateAppReqDto updateAppReqDto=new UpdateAppReqDto();
  if(reqDto!=null){
      updateAppReqDto.setAppId(reqDto.getAppId());//sourceId:11695_1
updateAppReqDto.setAppCode(reqDto.getAppCode());//sourceId:11696_1
updateAppReqDto.setAppName(reqDto.getAppName());//sourceId:11697_1
updateAppReqDto.setAppIntroduce(reqDto.getAppIntroduce());//sourceId:11698_1
updateAppReqDto.setAppUpdateIntroduct(reqDto.getAppUpdateIntroduct());//sourceId:11699_1
updateAppReqDto.setWebsite(reqDto.getWebsite());//sourceId:11700_1
updateAppReqDto.setAppLogo(reqDto.getAppLogo());//sourceId:11701_1
updateAppReqDto.setAboutLogo(reqDto.getAboutLogo());//sourceId:11702_1
updateAppReqDto.setAppBanner(reqDto.getAppBanner());//sourceId:11703_1
updateAppReqDto.setAppBigBanner(reqDto.getAppBigBanner());//sourceId:62224_1
updateAppReqDto.setServicePhone(reqDto.getServicePhone());//sourceId:11704_1
updateAppReqDto.setServiceTime(reqDto.getServiceTime());//sourceId:11705_1
updateAppReqDto.setCopyright(reqDto.getCopyright());//sourceId:11706_1
updateAppReqDto.setAppVersion(reqDto.getAppVersion());//sourceId:11707_1
updateAppReqDto.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//sourceId:11711_1
    }
if(updateAppReqDto!=null){
      updateAppReqDto.setPlatformType(updateAppReqDto.getPlatformType());//sourceId:11709_1
    }
  
    /*D1-2修改联盟应用[568]   */
    Assert.isNull(updateAppReqDto.getAppId(),"B1-2修改联盟应用（平台）-D1-2修改联盟应用-应用ID不能为空",false);
      updateAppRespDto = fwBaseBaseClient.updateApp(updateAppReqDto).getData();
      
      
    
BffUpdateAppRespDto retData = new BffUpdateAppRespDto();
  
  

  
  
return retData;
  }

    /**
   * B1-2新增空间应用（平台）[556]
   * gen by moon at 12/2/2022, 5:09:38 PM
   */
    @Trace(operationName = "B1-2新增空间应用（平台）")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffAddSpaceAppRespDto addSpaceApp(BffAddSpaceAppReqDto reqDto){
      
       
       AddAppRespDto addAppRespDto_1 =null;
//virtualUsage D1-2新增联盟应用  1126
      AddAppRespDto addAppRespDto = null;
    AddAppReqDto addAppReqDto=new AddAppReqDto();
  addAppReqDto.setPlatformType("FALSE");//sourceId:40115_1_1126
if(reqDto!=null){
      addAppReqDto.setAppName(reqDto.getAppName());//SimpleFieldAssign//sourceId:15346_1_1126
addAppReqDto.setAppIntroduce(reqDto.getAppIntroduce());//SimpleFieldAssign//sourceId:15347_1_1126
addAppReqDto.setAppUpdateIntroduct(reqDto.getAppUpdateIntroduct());//SimpleFieldAssign//sourceId:15348_1_1126
addAppReqDto.setWebsite(reqDto.getWebsite());//SimpleFieldAssign//sourceId:15349_1_1126
addAppReqDto.setAppLogo(reqDto.getAppLogo());//SimpleFieldAssign//sourceId:15350_1_1126
addAppReqDto.setAboutLogo(reqDto.getAboutLogo());//SimpleFieldAssign//sourceId:15351_1_1126
addAppReqDto.setAppBanner(reqDto.getAppBanner());//SimpleFieldAssign//sourceId:15352_1_1126
addAppReqDto.setAppBigBanner(reqDto.getAppBigBanner());//SimpleFieldAssign//sourceId:62277_1_1126
addAppReqDto.setServicePhone(reqDto.getServicePhone());//SimpleFieldAssign//sourceId:15353_1_1126
addAppReqDto.setServiceTime(reqDto.getServiceTime());//SimpleFieldAssign//sourceId:15354_1_1126
addAppReqDto.setCopyright(reqDto.getCopyright());//SimpleFieldAssign//sourceId:15355_1_1126
addAppReqDto.setAppVersion(reqDto.getAppVersion());//SimpleFieldAssign//sourceId:15356_1_1126
addAppReqDto.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:15359_1_1126
addAppReqDto.setUniqueSpaceId(reqDto.getUniqueSpaceId());//SimpleFieldAssign//sourceId:33387_1_1126
addAppReqDto.setSceneId(reqDto.getSceneId());//SimpleFieldAssign//sourceId:33388_1_1126
    }
  
    /*D1-2新增联盟应用[557]   */
    Assert.isNull(addAppReqDto.getAppName(),"B1-2新增空间应用（平台）-D1-2新增联盟应用-应用名称不能为空",false);
Assert.isNull(addAppReqDto.getAppLogo(),"B1-2新增空间应用（平台）-D1-2新增联盟应用-应用框架logo图片不能为空",false);
Assert.isNull(addAppReqDto.getAboutLogo(),"B1-2新增空间应用（平台）-D1-2新增联盟应用-关于我们logo图片不能为空",false);
Assert.isNull(addAppReqDto.getAppBanner(),"B1-2新增空间应用（平台）-D1-2新增联盟应用-应用登录banner不能为空",false);
Assert.isNull(addAppReqDto.getCopyright(),"B1-2新增空间应用（平台）-D1-2新增联盟应用-版权信息不能为空",false);
Assert.isNull(addAppReqDto.getAppVersion(),"B1-2新增空间应用（平台）-D1-2新增联盟应用-应用版本信息不能为空",false);
Assert.isNull(addAppReqDto.getSubjectLifeCycle(),"B1-2新增空间应用（平台）-D1-2新增联盟应用-主体生命周期不能为空",false);
Assert.isNull(addAppReqDto.getPlatformType(),"B1-2新增空间应用（平台）-D1-2新增联盟应用-是否平台应用不能为空",false);
Assert.isNull(addAppReqDto.getUniqueSpaceId(),"B1-2新增空间应用（平台）-D1-2新增联盟应用-管理的空间ID不能为空",false);
Assert.isNull(addAppReqDto.getSceneId(),"B1-2新增空间应用（平台）-D1-2新增联盟应用-空间的场景ID不能为空",false);
      addAppRespDto = fwBaseBaseClient.addApp(addAppReqDto).getData();
      
      
      addAppRespDto_1 = addAppRespDto;
if((reqDto!= null&&  reqDto.getSubjectLifeCycle() !=null && reqDto.getSubjectLifeCycle().equals("CURRENTLY_VALID"))) {
        //if(B1-2新增空间应用（平台）.主体生命周期 等于 当前有效)  1127
        
PutSpaceInfoToRedisRespDto putSpaceInfoToRedisRespDto = null;
    PutSpaceInfoToRedisReqDto putSpaceInfoToRedisReqDto=new PutSpaceInfoToRedisReqDto();
  if(reqDto!=null){
      putSpaceInfoToRedisReqDto.setSpaceId(reqDto.getUniqueSpaceId());//SimpleFieldAssign//sourceId:44541_1_1128
    }
  
    /*空间信息存储缓存[1552]   */
    Assert.isNull(putSpaceInfoToRedisReqDto.getSpaceId(),"B1-2新增空间应用（平台）-空间信息存储缓存-空间ID不能为空",false);
      putSpaceInfoToRedisRespDto = fwBaseCommonClient.putSpaceInfoToRedis(putSpaceInfoToRedisReqDto).getData();
      
      
      
//processBranchName:正常结束 ,processBranchId:1129
        
      }
BffAddSpaceAppRespDto retData = new BffAddSpaceAppRespDto();
  if(addAppRespDto_1!=null){
      retData.setAppId(addAppRespDto_1.getAppId());//SimpleFieldAssign//sourceId:33025_1
    }
  

  
  
return retData;
  }

    /**
   * B1-2查询联盟应用详情（平台）[540]
   * gen by moon at 8/10/2022, 3:40:19 AM
   */
    @Trace(operationName = "B1-2查询联盟应用详情（平台）")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffQueryAppDetailRespDto queryAppDetail(BffQueryAppDetailReqDto reqDto){
      
       
       QueryAppDetailRespDto queryAppDetailRespDto_1 = null;
QueryInductionRecordInfoDetailComRespDto queryInductionRecordInfoDetailComRespDto_1 = null;
//步骤0: D1-2查询联盟应用详情 - queryAppDetail
     QueryAppDetailRespDto queryAppDetailRespDto = null;
    QueryAppDetailReqDto queryAppDetailReqDto=new QueryAppDetailReqDto();
  if(reqDto!=null){
      queryAppDetailReqDto.setAppId(reqDto.getAppId());//sourceId:13196_1
    }
  
    /*D1-2查询联盟应用详情[541]   */
    
      queryAppDetailRespDto = fwBaseBaseClient.queryAppDetail(queryAppDetailReqDto).getData();
      
      queryAppDetailRespDto_1 = queryAppDetailRespDto;
    
//步骤1: D1-3查询个人就职记录信息详情（公共） - queryInductionRecordInfoDetailCom
     QueryInductionRecordInfoDetailComRespDto queryInductionRecordInfoDetailComRespDto = null;
    if(queryAppDetailRespDto !=null){
          QueryInductionRecordInfoDetailComReqDto queryInductionRecordInfoDetailComReqDto=new QueryInductionRecordInfoDetailComReqDto();
  if(queryAppDetailRespDto!=null){
      queryInductionRecordInfoDetailComReqDto.setInductionRecordId(queryAppDetailRespDto.getOperationInductionId());//sourceId:15192_1
    }
  
    /*D1-3查询个人就职记录信息详情（公共）[715]   */
    Assert.isNull(queryInductionRecordInfoDetailComReqDto.getInductionRecordId(),"B1-2查询联盟应用详情（平台）-D1-3查询个人就职记录信息详情（公共）-就职记录ID不能为空",false);
      queryInductionRecordInfoDetailComRespDto = fwBaseInductionRecordClient.queryInductionRecordInfoDetailCom(queryInductionRecordInfoDetailComReqDto).getData();
      
      queryInductionRecordInfoDetailComRespDto_1 = queryInductionRecordInfoDetailComRespDto;
           }
    
BffQueryAppDetailRespDto retData = new BffQueryAppDetailRespDto();
  if(queryAppDetailRespDto_1!=null){
      retData.setAppId(queryAppDetailRespDto_1.getAppId());//sourceId:32810_1
retData.setAppCode(queryAppDetailRespDto_1.getAppCode());//sourceId:32811_1
retData.setAppName(queryAppDetailRespDto_1.getAppName());//sourceId:32812_1
retData.setAppIntroduce(queryAppDetailRespDto_1.getAppIntroduce());//sourceId:32813_1
retData.setAppUpdateIntroduct(queryAppDetailRespDto_1.getAppUpdateIntroduct());//sourceId:32814_1
retData.setWebsite(queryAppDetailRespDto_1.getWebsite());//sourceId:32815_1
retData.setAppLogo(queryAppDetailRespDto_1.getAppLogo());//sourceId:32816_1
retData.setAboutLogo(queryAppDetailRespDto_1.getAboutLogo());//sourceId:32817_1
retData.setAppBanner(queryAppDetailRespDto_1.getAppBanner());//sourceId:32818_1
retData.setAppBigBanner(queryAppDetailRespDto_1.getAppBigBanner());//sourceId:62258_1
retData.setServicePhone(queryAppDetailRespDto_1.getServicePhone());//sourceId:32819_1
retData.setServiceTime(queryAppDetailRespDto_1.getServiceTime());//sourceId:32820_1
retData.setCopyright(queryAppDetailRespDto_1.getCopyright());//sourceId:32821_1
retData.setPlatformType(queryAppDetailRespDto_1.getPlatformType());//sourceId:32822_1
retData.setAppVersion(queryAppDetailRespDto_1.getAppVersion());//sourceId:32823_1
retData.setUniqueSpaceId(queryAppDetailRespDto_1.getUniqueSpaceId());//sourceId:33460_1
retData.setSpaceName(queryAppDetailRespDto_1.getSpaceName());//sourceId:33461_1
retData.setSceneId(queryAppDetailRespDto_1.getSceneId());//sourceId:33462_1
retData.setSceneName(queryAppDetailRespDto_1.getSceneName());//sourceId:33463_1
retData.setSubjectLifeCycle(queryAppDetailRespDto_1.getSubjectLifeCycle());//sourceId:32824_1
retData.setOperationInductionId(queryAppDetailRespDto_1.getOperationInductionId());//sourceId:32825_1
retData.setOperateTime(queryAppDetailRespDto_1.getOperateTime());//sourceId:32826_1
    }
if(queryInductionRecordInfoDetailComRespDto_1!=null){
      retData.setUserId(queryInductionRecordInfoDetailComRespDto_1.getUserId());//sourceId:32827_1
retData.setIdCardName(queryInductionRecordInfoDetailComRespDto_1.getIdCardName());//sourceId:32828_1
retData.setNickName(queryInductionRecordInfoDetailComRespDto_1.getNickName());//sourceId:32829_1
retData.setUserFace(queryInductionRecordInfoDetailComRespDto_1.getUserFace());//sourceId:32830_1
    }
  

  
  
return retData;
  }

    /**
   * B1-2查询联盟应用列表（平台）[538]
   * gen by moon at 8/10/2022, 3:40:17 AM
   */
    @Trace(operationName = "B1-2查询联盟应用列表（平台）")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffQueryAppListRespDto queryAppList(BffQueryAppListReqDto reqDto){
      
       
       QueryAppListRespDto queryAppListRespDto_1 = null;
BatchQueryInductionRecordListComRespDto batchQueryInductionRecordListComRespDto_1 = null;
//步骤0: D1-2查询联盟应用列表 - queryAppList
     QueryAppListRespDto queryAppListRespDto = null;
    QueryAppListReqDto queryAppListReqDto=new QueryAppListReqDto();
  if(reqDto!=null){
      queryAppListReqDto.setPlatformType(reqDto.getPlatformType());//sourceId:12916_1
queryAppListReqDto.setIsArchive(reqDto.getIsArchive());//sourceId:15189_1
    }
  
    /*D1-2查询联盟应用列表[539]   */
    Assert.isNull(queryAppListReqDto.getIsArchive(),"B1-2查询联盟应用列表（平台）-D1-2查询联盟应用列表-是否存档不能为空",false);
      queryAppListRespDto = fwBaseBaseClient.queryAppList(queryAppListReqDto).getData();
      
      queryAppListRespDto_1 = queryAppListRespDto;
    
//步骤1: D1-3批量查询就职记录列表（公共） - batchQueryInductionRecordListCom
     BatchQueryInductionRecordListComRespDto batchQueryInductionRecordListComRespDto = null;
    if(queryAppListRespDto !=null){
          BatchQueryInductionRecordListComReqDto batchQueryInductionRecordListComReqDto=new BatchQueryInductionRecordListComReqDto();
  if(queryAppListRespDto!=null){
      batchQueryInductionRecordListComReqDto.setPerOrgInductionRecordList(queryAppListRespDto.getUnionAppList().stream().map(item->item.getOperationInductionId())
        .collect(Collectors.toList()));//sourceId:13027_1
    }
  
    /*D1-3批量查询就职记录列表（公共）[602]   */
    
      batchQueryInductionRecordListComRespDto = fwBaseInductionRecordClient.batchQueryInductionRecordListCom(batchQueryInductionRecordListComReqDto).getData();
      
      batchQueryInductionRecordListComRespDto_1 = batchQueryInductionRecordListComRespDto;
           }
    
BffQueryAppListRespDto retData = new BffQueryAppListRespDto();
  //数据集融合
        if(queryAppListRespDto_1!= null && !CollectionUtil.isEmpty(queryAppListRespDto_1.getUnionAppList())){
          for (UnionAppDto unionAppDto : queryAppListRespDto_1.getUnionAppList()) {
              BffUnionAppDto retElm = new BffUnionAppDto();
             if(queryAppListRespDto_1!=null){
      retElm.setAppId(unionAppDto.getAppId());//sourceId:4990_2
retElm.setAppCode(unionAppDto.getAppCode());//sourceId:5002_2
retElm.setAppName(unionAppDto.getAppName());//sourceId:4991_2
retElm.setAppIntroduce(unionAppDto.getAppIntroduce());//sourceId:4992_2
retElm.setWebsite(unionAppDto.getWebsite());//sourceId:4994_2
retElm.setAppLogo(unionAppDto.getAppLogo());//sourceId:4995_2
retElm.setSubjectLifeCycle(unionAppDto.getSubjectLifeCycle());//sourceId:5004_2
retElm.setOperationInductionId(unionAppDto.getOperationInductionId());//sourceId:5005_2
retElm.setOperateTime(unionAppDto.getOperateTime());//sourceId:5006_2
    }
              retData.getUnionAppList().add(retElm);
               if(batchQueryInductionRecordListComRespDto_1!= null){
          for (PerOrgInductionRecordDto perOrgInductionRecordDto : batchQueryInductionRecordListComRespDto_1.getPerOrgInductionRecordList()) {
                if (perOrgInductionRecordDto.getInductionRecordId().equals(unionAppDto.getOperationInductionId())) {
                 if(batchQueryInductionRecordListComRespDto_1!=null){
      retElm.setUserId(perOrgInductionRecordDto.getUserId());//sourceId:38716_2
retElm.setUserFace(perOrgInductionRecordDto.getUserFace());//sourceId:38719_2
retElm.setIdCardName(perOrgInductionRecordDto.getIdCardName());//sourceId:38717_2
retElm.setNickName(perOrgInductionRecordDto.getNickName());//sourceId:38718_2
    }
                }
            }
          }
        
          }
        }//sourceId:13029_1
  

  retData.setPageNum(queryAppListRespDto.getPageNum());
        retData.setPageSize(queryAppListRespDto.getPageSize());
        retData.setTotal(queryAppListRespDto.getTotalNum());
        retData.setIsLastPage((Math.ceil(Double.valueOf(queryAppListRespDto.getTotalNum()) / Double.valueOf(queryAppListRespDto.getPageSize()))) <= retData.getPageNum());
        
  
return retData;
  }

    /**
   * B1-2修改空间（平台）[438]
   * gen by moon at 8/10/2022, 3:40:00 AM
   */
    @Trace(operationName = "B1-2修改空间（平台）")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffUpdateSpaceRespDto updateSpace(BffUpdateSpaceReqDto reqDto){
      
       
       //步骤0: D1-2修改空间 - updateSpace
     UpdateSpaceRespDto updateSpaceRespDto = null;
    UpdateSpaceReqDto updateSpaceReqDto=new UpdateSpaceReqDto();
  if(reqDto!=null){
      updateSpaceReqDto.setSpaceId(reqDto.getSpaceId());//sourceId:15988_1
updateSpaceReqDto.setOrganizationNumber(reqDto.getOrganizationNumber());//sourceId:32546_1
updateSpaceReqDto.setSpaceName(reqDto.getSpaceName());//sourceId:15990_1
updateSpaceReqDto.setAbbreviation(reqDto.getAbbreviation());//sourceId:15991_1
updateSpaceReqDto.setSpaceLogo(reqDto.getSpaceLogo());//sourceId:15992_1
updateSpaceReqDto.setSpaceCopyRight(reqDto.getSpaceCopyRight());//sourceId:15993_1
    }
  
    /*D1-2修改空间[439]   */
    Assert.isNull(updateSpaceReqDto.getSpaceId(),"B1-2修改空间（平台）-D1-2修改空间-空间ID不能为空",false);
      updateSpaceRespDto = fwBaseBaseClient.updateSpace(updateSpaceReqDto).getData();
      
      
    
BffUpdateSpaceRespDto retData = new BffUpdateSpaceRespDto();
  
  

  
  
return retData;
  }

    /**
   * B1-2查询空间详情（平台）[437]
   * gen by moon at 8/10/2022, 3:39:58 AM
   */
    @Trace(operationName = "B1-2查询空间详情（平台）")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffQuerySpaceDetailRespDto querySpaceDetail(BffQuerySpaceDetailReqDto reqDto){
      
       
       QuerySpaceDetailComRespDto querySpaceDetailComRespDto_1 = null;
QueryInductionRecordInfoDetailComRespDto queryInductionRecordInfoDetailComRespDto_1 = null;
//步骤0: D1-2查空间详情(公共) - querySpaceDetailCom
     QuerySpaceDetailComRespDto querySpaceDetailComRespDto = null;
    QuerySpaceDetailComReqDto querySpaceDetailComReqDto=new QuerySpaceDetailComReqDto();
  if(reqDto!=null){
      querySpaceDetailComReqDto.setSpaceId(reqDto.getSpaceId());//sourceId:32602_1
    }
  
    /*D1-2查空间详情(公共)[402]   */
    Assert.isNull(querySpaceDetailComReqDto.getSpaceId(),"B1-2查询空间详情（平台）-D1-2查空间详情(公共)-空间ID不能为空",false);
      querySpaceDetailComRespDto = fwBaseBaseClient.querySpaceDetailCom(querySpaceDetailComReqDto).getData();
      
      querySpaceDetailComRespDto_1 = querySpaceDetailComRespDto;
    
//步骤1: D1-3查询个人就职记录信息详情（公共） - queryInductionRecordInfoDetailCom
     QueryInductionRecordInfoDetailComRespDto queryInductionRecordInfoDetailComRespDto = null;
    if(querySpaceDetailComRespDto !=null){
          QueryInductionRecordInfoDetailComReqDto queryInductionRecordInfoDetailComReqDto=new QueryInductionRecordInfoDetailComReqDto();
  if(querySpaceDetailComRespDto!=null){
      queryInductionRecordInfoDetailComReqDto.setInductionRecordId(querySpaceDetailComRespDto.getCreateInductionId());//sourceId:32692_1
    }
  
    /*D1-3查询个人就职记录信息详情（公共）[715]   */
    Assert.isNull(queryInductionRecordInfoDetailComReqDto.getInductionRecordId(),"B1-2查询空间详情（平台）-D1-3查询个人就职记录信息详情（公共）-就职记录ID不能为空",false);
      queryInductionRecordInfoDetailComRespDto = fwBaseInductionRecordClient.queryInductionRecordInfoDetailCom(queryInductionRecordInfoDetailComReqDto).getData();
      
      queryInductionRecordInfoDetailComRespDto_1 = queryInductionRecordInfoDetailComRespDto;
           }
    
BffQuerySpaceDetailRespDto retData = new BffQuerySpaceDetailRespDto();
  if(querySpaceDetailComRespDto_1!=null){
      retData.setSpaceId(querySpaceDetailComRespDto_1.getSpaceId());//sourceId:32698_1
retData.setOrganizationNumber(querySpaceDetailComRespDto_1.getOrganizationNumber());//sourceId:32699_1
retData.setSpaceName(querySpaceDetailComRespDto_1.getSpaceName());//sourceId:32700_1
retData.setAbbreviation(querySpaceDetailComRespDto_1.getAbbreviation());//sourceId:32701_1
retData.setSpaceLogo(querySpaceDetailComRespDto_1.getSpaceLogo());//sourceId:32702_1
retData.setSpaceCopyRight(querySpaceDetailComRespDto_1.getSpaceCopyRight());//sourceId:32703_1
retData.setPlatformType(querySpaceDetailComRespDto_1.getPlatformType());//sourceId:32704_1
retData.setIsInvalid(querySpaceDetailComRespDto_1.getIsInvalid());//sourceId:32705_1
retData.setIsInvalidReason(querySpaceDetailComRespDto_1.getIsInvalidReason());//sourceId:32706_1
retData.setIsInvalidTime(querySpaceDetailComRespDto_1.getIsInvalidTime());//sourceId:32707_1
retData.setInvalidType(querySpaceDetailComRespDto_1.getInvalidType());//sourceId:32708_1
retData.setSubjectionSceneId(querySpaceDetailComRespDto_1.getSubjectionSceneId());//sourceId:32709_1
retData.setSceneName(querySpaceDetailComRespDto_1.getSceneName());//sourceId:32710_1
retData.setSubjectionAppId(querySpaceDetailComRespDto_1.getSubjectionAppId());//sourceId:32711_1
retData.setAppName(querySpaceDetailComRespDto_1.getAppName());//sourceId:32712_1
retData.setCreateInductionId(querySpaceDetailComRespDto_1.getCreateInductionId());//sourceId:32713_1
retData.setCreateTime(querySpaceDetailComRespDto_1.getCreateTime());//sourceId:32714_1
    }
if(queryInductionRecordInfoDetailComRespDto_1!=null){
      retData.setUserId(queryInductionRecordInfoDetailComRespDto_1.getUserId());//sourceId:32715_1
retData.setUserFace(queryInductionRecordInfoDetailComRespDto_1.getUserFace());//sourceId:32716_1
retData.setIdCardName(queryInductionRecordInfoDetailComRespDto_1.getIdCardName());//sourceId:32717_1
retData.setNickName(queryInductionRecordInfoDetailComRespDto_1.getNickName());//sourceId:32718_1
    }
  

  
  
return retData;
  }

    /**
   * B1-2新增空间（平台）[435]
   * gen by moon at 1/24/2024, 4:12:12 AM
   */
    @Trace(operationName = "B1-2新增空间（平台）")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffAddSpaceRespDto addSpace(BffAddSpaceReqDto reqDto){
      
       
       AddSpaceRespDto addSpaceRespDto_1 =null;
//virtualUsage D3组织架构检查项转数据集服务(公共)  22737
      TransitionCheckItemComRespDto transitionCheckItemComRespDto = null;
    TransitionCheckItemComReqDto transitionCheckItemComReqDto=new TransitionCheckItemComReqDto();
  transitionCheckItemComReqDto.setCheckItemCode1("ORG_MGT_CHECK");//CUSTOM_CONVENTION//sourceId:462108_1_22737
transitionCheckItemComReqDto.setCheckItemCode2("ORG_MEMBER_CHECK");//CUSTOM_CONVENTION//sourceId:462109_1_22737
  
    /*D3组织架构检查项转数据集服务(公共)[3405]   */
    Assert.isNull(transitionCheckItemComReqDto.getCheckItemCode1(),"B1-2新增空间（平台）-D3组织架构检查项转数据集服务(公共)-检验项标识1不能为空",false);
Assert.isNull(transitionCheckItemComReqDto.getCheckItemCode2(),"B1-2新增空间（平台）-D3组织架构检查项转数据集服务(公共)-检验项标识2不能为空",false);
      transitionCheckItemComRespDto = fwAppOffStateClient.transitionCheckItemCom(transitionCheckItemComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;
      
      
      
if((transitionCheckItemComRespDto!= null&&  transitionCheckItemComRespDto.getCheckItemList() !=null && transitionCheckItemComRespDto.getCheckItemList().size()>0)) {
        //if(D3组织架构检查项转数据集服务(公共).检查项数据集条数 大于 0)  1362
        
AddSpaceRespDto addSpaceRespDto = null;
    if(transitionCheckItemComRespDto !=null){
          AddSpaceReqDto addSpaceReqDto=new AddSpaceReqDto();
  if(reqDto!=null){
      addSpaceReqDto.setOrganizationNumber(reqDto.getOrganizationNumber());//SimpleFieldAssign//sourceId:32515_1_1363
addSpaceReqDto.setSpaceName(reqDto.getSpaceName());//SimpleFieldAssign//sourceId:15952_1_1363
addSpaceReqDto.setAbbreviation(reqDto.getAbbreviation());//SimpleFieldAssign//sourceId:15953_1_1363
addSpaceReqDto.setSpaceLogo(reqDto.getSpaceLogo());//SimpleFieldAssign//sourceId:15967_1_1363
addSpaceReqDto.setSpaceCopyRight(reqDto.getSpaceCopyRight());//SimpleFieldAssign//sourceId:15954_1_1363
addSpaceReqDto.setPlatformType(reqDto.getPlatformType());//SimpleFieldAssign//sourceId:15955_1_1363
addSpaceReqDto.setSubjectionSceneId(reqDto.getSubjectionSceneId());//SimpleFieldAssign//sourceId:15956_1_1363
addSpaceReqDto.setSubjectionAppId(reqDto.getSubjectionAppId());//SimpleFieldAssign//sourceId:16280_1_1363
    }
if(transitionCheckItemComRespDto!=null){
      addSpaceReqDto.setCheckItemStatList(transitionCheckItemComRespDto.getCheckItemList());//list-field-assign//sourceId:32449_1_1363
    }
  
    /*D1-2新增空间（平台）[436]   */
    Assert.isNull(addSpaceReqDto.getOrganizationNumber(),"B1-2新增空间（平台）-D1-2新增空间（平台）-空间编号不能为空",false);
Assert.isNull(addSpaceReqDto.getSpaceName(),"B1-2新增空间（平台）-D1-2新增空间（平台）-空间名称不能为空",false);
Assert.isNull(addSpaceReqDto.getAbbreviation(),"B1-2新增空间（平台）-D1-2新增空间（平台）-空间简称不能为空",false);
Assert.isNull(addSpaceReqDto.getSpaceLogo(),"B1-2新增空间（平台）-D1-2新增空间（平台）-头像logo不能为空",false);
Assert.isNull(addSpaceReqDto.getPlatformType(),"B1-2新增空间（平台）-D1-2新增空间（平台）-是否是平台不能为空",false);
Assert.isNull(addSpaceReqDto.getSubjectionSceneId(),"B1-2新增空间（平台）-D1-2新增空间（平台）-隶属场景id不能为空",false);
Assert.isNull(addSpaceReqDto.getSubjectionAppId(),"B1-2新增空间（平台）-D1-2新增空间（平台）-隶属联盟应用ID不能为空",false);
      addSpaceRespDto = fwBaseBaseClient.addSpace(addSpaceReqDto).getData()/*vcase invoke 跨dubbo调用;*/;
      
      
      addSpaceRespDto_1 = addSpaceRespDto;
           }
ImplementIniOrgWorkTaskMsgLocationByLoginComRespDto implementIniOrgWorkTaskMsgLocationByLoginComRespDto = null;
    if(addSpaceRespDto !=null){
          ImplementIniOrgWorkTaskMsgLocationByLoginComReqDto implementIniOrgWorkTaskMsgLocationByLoginComReqDto=new ImplementIniOrgWorkTaskMsgLocationByLoginComReqDto();
  implementIniOrgWorkTaskMsgLocationByLoginComReqDto.setSurfaceCode("ORG_OR_DEPT");//sourceId:1499900_1_60086
if(addSpaceRespDto!=null){
      implementIniOrgWorkTaskMsgLocationByLoginComReqDto.setEntityId(addSpaceRespDto.getOrganizationId());//SimpleFieldAssign//sourceId:1499901_1_60086
implementIniOrgWorkTaskMsgLocationByLoginComReqDto.setSpaceId(addSpaceRespDto.getSpaceId());//SimpleFieldAssign//sourceId:1499899_1_60086
    }

    /*D2-执行初始化组织工作任务消息数量(公共)[7877]   */
    Assert.isNull(implementIniOrgWorkTaskMsgLocationByLoginComReqDto.getSurfaceCode(),"B1-2新增空间（平台）-D2-执行初始化组织工作任务消息数量(公共)-归属内容类型编码不能为空",false);
Assert.isNull(implementIniOrgWorkTaskMsgLocationByLoginComReqDto.getEntityId(),"B1-2新增空间（平台）-D2-执行初始化组织工作任务消息数量(公共)-归属内容ID不能为空",false);
Assert.isNull(implementIniOrgWorkTaskMsgLocationByLoginComReqDto.getSpaceId(),"B1-2新增空间（平台）-D2-执行初始化组织工作任务消息数量(公共)-创建于空间ID不能为空",false);
      implementIniOrgWorkTaskMsgLocationByLoginComRespDto = fwCompMessageClient.implementIniOrgWorkTaskMsgLocationByLoginCom(implementIniOrgWorkTaskMsgLocationByLoginComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;



           }
      }
else{
       //else  1365
      
//异常结束 1366
      throw new BizException("10400025","对不起，没找到可用的组织架构检查项，无法创建空间，请核实~",false);
    }
BffAddSpaceRespDto retData = new BffAddSpaceRespDto();
  if(addSpaceRespDto_1!=null){
      retData.setSpaceId(addSpaceRespDto_1.getSpaceId());//SimpleFieldAssign//sourceId:40114_1
    }
  

  
  
return retData;
  }

    /**
   * B1-2查询场景详情（平台）[304]
   * gen by moon at 8/10/2022, 3:39:27 AM
   */
    @Trace(operationName = "B1-2查询场景详情（平台）")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffQuerySceneDetailRespDto querySceneDetail(BffQuerySceneDetailReqDto reqDto){
      
       
       QuerySceneDetailRespDto querySceneDetailRespDto_1 = null;
QueryInductionRecordInfoDetailComRespDto queryInductionRecordInfoDetailComRespDto_1 = null;
//步骤0: D1-2-07查询场景详情 - querySceneDetail
     QuerySceneDetailRespDto querySceneDetailRespDto = null;
    QuerySceneDetailReqDto querySceneDetailReqDto=new QuerySceneDetailReqDto();
  if(reqDto!=null){
      querySceneDetailReqDto.setSceneId(reqDto.getSceneId());//sourceId:5200_1
    }
  
    /*D1-2-07查询场景详情[303]   */
    Assert.isNull(querySceneDetailReqDto.getSceneId(),"B1-2查询场景详情（平台）-D1-2-07查询场景详情-场景ID不能为空",false);
      querySceneDetailRespDto = fwBaseBaseClient.querySceneDetail(querySceneDetailReqDto).getData();
      
      querySceneDetailRespDto_1 = querySceneDetailRespDto;
    
//步骤1: D1-3查询个人就职记录信息详情（公共） - queryInductionRecordInfoDetailCom
     QueryInductionRecordInfoDetailComRespDto queryInductionRecordInfoDetailComRespDto = null;
    if(querySceneDetailRespDto !=null){
          QueryInductionRecordInfoDetailComReqDto queryInductionRecordInfoDetailComReqDto=new QueryInductionRecordInfoDetailComReqDto();
  if(querySceneDetailRespDto!=null){
      queryInductionRecordInfoDetailComReqDto.setInductionRecordId(querySceneDetailRespDto.getOperationInductionId());//sourceId:14489_1
    }
  
    /*D1-3查询个人就职记录信息详情（公共）[715]   */
    Assert.isNull(queryInductionRecordInfoDetailComReqDto.getInductionRecordId(),"B1-2查询场景详情（平台）-D1-3查询个人就职记录信息详情（公共）-就职记录ID不能为空",false);
      queryInductionRecordInfoDetailComRespDto = fwBaseInductionRecordClient.queryInductionRecordInfoDetailCom(queryInductionRecordInfoDetailComReqDto).getData();
      
      queryInductionRecordInfoDetailComRespDto_1 = queryInductionRecordInfoDetailComRespDto;
           }
    
BffQuerySceneDetailRespDto retData = new BffQuerySceneDetailRespDto();
  if(querySceneDetailRespDto_1!=null){
      retData.setSceneId(querySceneDetailRespDto_1.getSceneId());//sourceId:28446_1
retData.setSceneLogo(querySceneDetailRespDto_1.getSceneLogo());//sourceId:28450_1
retData.setSenceCode(querySceneDetailRespDto_1.getSenceCode());//sourceId:28447_1
retData.setSceneName(querySceneDetailRespDto_1.getSceneName());//sourceId:28448_1
retData.setSceneRemark(querySceneDetailRespDto_1.getSceneRemark());//sourceId:28449_1
retData.setPlatformType(querySceneDetailRespDto_1.getPlatformType());//sourceId:28454_1
retData.setSubjectLifeCycle(querySceneDetailRespDto_1.getSubjectLifeCycle());//sourceId:28451_1
retData.setAscriptionAppId(querySceneDetailRespDto_1.getAscriptionAppId());//sourceId:28455_1
retData.setAppName(querySceneDetailRespDto_1.getAppName());//sourceId:33516_1
retData.setOperationInductionId(querySceneDetailRespDto_1.getOperationInductionId());//sourceId:28452_1
retData.setOperateTime(querySceneDetailRespDto_1.getOperateTime());//sourceId:28453_1
    }
if(queryInductionRecordInfoDetailComRespDto_1!=null){
      retData.setUserId(queryInductionRecordInfoDetailComRespDto_1.getUserId());//sourceId:28460_1
retData.setUserFace(queryInductionRecordInfoDetailComRespDto_1.getUserFace());//sourceId:28463_1
retData.setIdCardName(queryInductionRecordInfoDetailComRespDto_1.getIdCardName());//sourceId:28461_1
retData.setNickName(queryInductionRecordInfoDetailComRespDto_1.getNickName());//sourceId:28462_1
    }
  

  
  
return retData;
  }

    /**
   * B1-2修改场景（平台）[302]
   * gen by moon at 8/10/2022, 3:39:25 AM
   */
    @Trace(operationName = "B1-2修改场景（平台）")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffUpdateSceneRespDto updateScene(BffUpdateSceneReqDto reqDto){
      
       
       //步骤0: D1-2-07修改场景 - updateScene
     UpdateSceneRespDto updateSceneRespDto = null;
    UpdateSceneReqDto updateSceneReqDto=new UpdateSceneReqDto();
  if(reqDto!=null){
      updateSceneReqDto.setSceneId(reqDto.getSceneId());//sourceId:33583_1
updateSceneReqDto.setSenceCode(reqDto.getSenceCode());//sourceId:33605_1
updateSceneReqDto.setSceneName(reqDto.getSceneName());//sourceId:33585_1
updateSceneReqDto.setSceneRemark(reqDto.getSceneRemark());//sourceId:33586_1
updateSceneReqDto.setSceneLogo(reqDto.getSceneLogo());//sourceId:33587_1
updateSceneReqDto.setPlatformType(reqDto.getPlatformType());//sourceId:33588_1
updateSceneReqDto.setAscriptionAppId(reqDto.getAscriptionAppId());//sourceId:33589_1
updateSceneReqDto.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//sourceId:33591_1
    }
  
    /*D1-2-07修改场景[301]   */
    Assert.isNull(updateSceneReqDto.getSceneId(),"B1-2修改场景（平台）-D1-2-07修改场景-场景ID不能为空",false);
      updateSceneRespDto = fwBaseBaseClient.updateScene(updateSceneReqDto).getData();
      
      
    
BffUpdateSceneRespDto retData = new BffUpdateSceneRespDto();
  
  

  
  
return retData;
  }
/**
   * B1-2查询筛选空间列表(管理)(边界)[3314]
   * gen by moon at 10/25/2022, 10:01:15 AM
   */
    @Trace(operationName = "B1-2查询筛选空间列表(管理)(边界)")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffQueryScreenSpaceListBorderRespDto queryScreenSpaceListBorder(BffQueryScreenSpaceListBorderReqDto reqDto){
      
       
       QuerySpaceListComRespDto querySpaceListComRespDto_1 =null;
//步骤0: D1-2查询空间列表(管理)(公共) - querySpaceListCom
     QuerySpaceListComRespDto querySpaceListComRespDto = null;
    QuerySpaceListComReqDto querySpaceListComReqDto=new QuerySpaceListComReqDto();
  
  
    /*D1-2查询空间列表(管理)(公共)[3315]   */
    
      querySpaceListComRespDto = fwBaseBaseClient.querySpaceListCom(querySpaceListComReqDto).getData();
      
      
      querySpaceListComRespDto_1 = querySpaceListComRespDto;
    
BffQueryScreenSpaceListBorderRespDto retData = new BffQueryScreenSpaceListBorderRespDto();
  if(querySpaceListComRespDto_1!=null){
      retData.setScreenSpaceList(querySpaceListComRespDto_1.getSpaceList().stream().map(item -> BeanUtil.toBean(item, BffScreenSpaceDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:128563_1
    }
  

  
  
return retData;
  }
    //
}
